package designmode.design2;

/**
 * Main
 *
 * @author lfg
 * @version 1.0
 */
public class Main {
    public static void main(String[] args) {

        KiwiBird kiwiBird = new KiwiBird();
        kiwiBird.setRunSpeed(50);

        SwallowBird swallowBird = new SwallowBird();
        swallowBird.setRunSpeed(100);
        swallowBird.setFlySpeed(200);

        double distance = 1000;
        System.out.println("Kiwi run need time: " + kiwiBird.getRunTime(distance));
        System.out.println("swallow run need time: " + swallowBird.getRunTime(distance));
        System.out.println("swallow fly need time: " + swallowBird.getFlyTime(distance));

    }
}
